package vek;

/**
 *  A static class which contains the settings for this terminal based on the XML file TerminalSettings.xml
 *  Simply provides global access for the rest of the program.
 *  Uses simple getters to get the variables.
 * @author Christian, Michal og Jakob (Hold 1, gruppe 2)
 */
public class TerminalSettings {
    
    private static String updateServer;
    private static String pathToUpdateFile;
    private static String pathToXMLFiles;
    private static int updateInterval;
    private static int terminalCoordinateX;
    private static int terminalCoordinateY;
    private static String terminalName;
    private static double pixelsPerMeter;
    
    private TerminalSettings()
    {
        // should not be used
    }
    
    public static void setSettings(String upserv, String updateFile, String path, int updateInt, 
            int coordX, int coordY, String name, double pixPerMeter)
    {
        updateServer = upserv;
        pathToUpdateFile = updateFile;
        pathToXMLFiles = path;
        updateInterval = updateInt;
        terminalCoordinateX = coordX;
        terminalCoordinateY = coordY;
        terminalName = name;
        pixelsPerMeter = pixPerMeter;
    }
    /**
    * Selfexplanatory
    * @return The path to the update file.
    */
    public static String getPathToUpdateFile()
    {
        return pathToUpdateFile;
    }
     /**
    * Selfexplanatory
    * @return The address of the update server.
    */
    public static String getUpdateServer()
    {
        return updateServer;
    }
   
     /**
     * Selfexplanatory
     * @return The path to the XML files.
     */
    public static String getPathToXMLFiles()
    {
        return pathToXMLFiles;
    }
    
     /**
    * Selfexplanatory
    * @return The update interval
    */
    public static int getUpdateInteval()
    {
        return updateInterval;
    }
    
     /**
     * Selfexplanatory
     * @return The terminals X-coordinate
     */
    public static int getTerminalXCoord()
    {
        return terminalCoordinateX;
    }
    
    /**
    * Selfexplanatory
    * @return The terminals Y-coordinate
    */
    public static int getTerminalYCoord()
    {
        return terminalCoordinateY;
    }
    
     /**
    * Selfexplanatory
    * @return The name fo the terminal
    */
    public static String getTerminalName()
    {
        return terminalName;
    }
    
    public static double getPixelsPerMeter()
    {
        return pixelsPerMeter;
    }

}
